Gloomy-Networking Documentation

Network Settings

Network Settings

These scripts are used for changing settings of the Network. Note that these settings should be changed directly after the network is established.


gnet_set_ping_frequency

Syntax:

gnet_set_ping_frequency(Seconds);
Argument name Type Description
Seconds Number Amount of seconds between sending ping packets

Description:

Set the ping frequency in seconds. This is how much time there shoudld be between sending ping packets. Note that when no other information is going on, these packets keep the connection alive. If you change this setting you may want to also extend the connectionTimeoutTimer using gnet_set_connection_timeout()


gnet_set_connection_timeout

Syntax:

gnet_set_connection_timeout(Seconds);
Argument name Type Description
Seconds Number Amount of time with no data sent before OnConnectionProblem(connectionId) is triggered.

Description:

Set the time in seconds that it takes for the OnConnectionProblem script to trigger. This will trigger if data hasnt been received in this givin amount of time from a specific connection


gnet_get_my_port

Syntax:

gnet_get_my_port();

Returns: (Number) Port Returns the port that you are sending and receiving data on

Description:

Get the port that you are communicating on


gnet_get_my_socket

Syntax:

gnet_get_my_socket();

Returns: (Number) SocketId Returns the socketId of the gamemaker socket that you are sending and receiving data on

Description:

Get the socket id that you are using to communicate on